Optimal. Leaf size=267 \[ \frac {(A+B) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m}}{f (7+2 m)}+\frac {(3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3-m}}{c f (5+2 m) (7+2 m)}+\frac {2 (3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2-m}}{c^2 f (7+2 m) \left (15+16 m+4 m^2\right )}+\frac {2 (3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1-m}}{c^3 f (5+2 m) (7+2 m) \left (3+8 m+4 m^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.30, antiderivative size = 267, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {3051, 2822,
2821} \begin {gather*} \frac {2 (3 A-2 B (m+2)) \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-1}}{c^3 f (2 m+5) (2 m+7) \left (4 m^2+8 m+3\right )}+\frac {2 (3 A-2 B (m+2)) \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-2}}{c^2 f (2 m+7) \left (4 m^2+16 m+15\right )}+\frac {(A+B) \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-4}}{f (2 m+7)}+\frac {(3 A-2 B (m+2)) \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-3}}{c f (2 m+5) (2 m+7)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2821
Rule 2822
Rule 3051
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-4-m} \, dx &=\frac {(A+B) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m}}{f (7+2 m)}+\frac {(3 A-2 B (2+m)) \int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3-m} \, dx}{c (7+2 m)}\\ &=\frac {(A+B) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m}}{f (7+2 m)}+\frac {(3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3-m}}{c f (5+2 m) (7+2 m)}+\frac {(2 (3 A-2 B (2+m))) \int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2-m} \, dx}{c^2 (5+2 m) (7+2 m)}\\ &=\frac {(A+B) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m}}{f (7+2 m)}+\frac {(3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3-m}}{c f (5+2 m) (7+2 m)}+\frac {2 (3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2-m}}{c^2 f (3+2 m) (5+2 m) (7+2 m)}+\frac {(2 (3 A-2 B (2+m))) \int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1-m} \, dx}{c^3 (3+2 m) (5+2 m) (7+2 m)}\\ &=\frac {(A+B) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m}}{f (7+2 m)}+\frac {(3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3-m}}{c f (5+2 m) (7+2 m)}+\frac {2 (3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2-m}}{c^2 f (3+2 m) (5+2 m) (7+2 m)}+\frac {2 (3 A-2 B (2+m)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1-m}}{c^3 f (1+2 m) (3+2 m) (5+2 m) (7+2 m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 17.91, size = 353, normalized size = 1.32 \begin {gather*} -\frac {2^{-18-m} \cos \left (\frac {1}{2} \left (-e+\frac {\pi }{2}-f x\right )\right ) \csc ^{21}\left (\frac {1}{8} \left (-e+\frac {\pi }{2}-f x\right )\right ) \sec ^7\left (\frac {1}{8} \left (-e+\frac {\pi }{2}-f x\right )\right ) \sin ^{-2 m}\left (\frac {1}{2} \left (-e+\frac {\pi }{2}-f x\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{-2 (-4-m)} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \left (-96 A+58 B-176 A m+64 B m-96 A m^2+16 B m^2-16 A m^3+4 (2+m) (-3 A+2 B (2+m)) \cos \left (2 \left (-e+\frac {\pi }{2}-f x\right )\right )+3 A \cos \left (3 \left (-e+\frac {\pi }{2}-f x\right )\right )-4 B \cos \left (3 \left (-e+\frac {\pi }{2}-f x\right )\right )-2 B m \cos \left (3 \left (-e+\frac {\pi }{2}-f x\right )\right )+\left (29+32 m+8 m^2\right ) (3 A-2 B (2+m)) \sin (e+f x)\right )}{f (1+2 m) (3+2 m) (5+2 m) (7+2 m) \left (-1+\cot ^2\left (\frac {1}{8} \left (-e+\frac {\pi }{2}-f x\right )\right )\right )^7} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.37, size = 0, normalized size = 0.00 \[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{-4-m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 212, normalized size = 0.79 \begin {gather*} \frac {{\left (4 \, {\left (2 \, B m^{2} - {\left (3 \, A - 8 \, B\right )} m - 6 \, A + 8 \, B\right )} \cos \left (f x + e\right )^{3} + {\left (8 \, A m^{3} + 12 \, {\left (4 \, A - B\right )} m^{2} + 2 \, {\left (47 \, A - 24 \, B\right )} m + 60 \, A - 45 \, B\right )} \cos \left (f x + e\right ) - {\left (2 \, {\left (2 \, B m - 3 \, A + 4 \, B\right )} \cos \left (f x + e\right )^{3} - {\left (8 \, B m^{3} - 12 \, {\left (A - 4 \, B\right )} m^{2} - 2 \, {\left (24 \, A - 47 \, B\right )} m - 45 \, A + 60 \, B\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4}}{16 \, f m^{4} + 128 \, f m^{3} + 344 \, f m^{2} + 352 \, f m + 105 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 22.23, size = 368, normalized size = 1.38 \begin {gather*} -\frac {\sin \left (4\,e+4\,f\,x\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,\left (4\,B-3\,A+2\,B\,m\right )\,1{}\mathrm {i}}{4\,f\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{m+4}\,\left (m^4\,16{}\mathrm {i}+m^3\,128{}\mathrm {i}+m^2\,344{}\mathrm {i}+m\,352{}\mathrm {i}+105{}\mathrm {i}\right )}+\frac {\cos \left (e+f\,x\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,\left (A\,168{}\mathrm {i}-B\,84{}\mathrm {i}+A\,m\,340{}\mathrm {i}-B\,m\,96{}\mathrm {i}+A\,m^2\,192{}\mathrm {i}+A\,m^3\,32{}\mathrm {i}-B\,m^2\,24{}\mathrm {i}\right )}{4\,f\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{m+4}\,\left (m^4\,16{}\mathrm {i}+m^3\,128{}\mathrm {i}+m^2\,344{}\mathrm {i}+m\,352{}\mathrm {i}+105{}\mathrm {i}\right )}+\frac {\sin \left (2\,e+2\,f\,x\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,\left (2\,m^2+8\,m+7\right )\,\left (4\,B-3\,A+2\,B\,m\right )\,1{}\mathrm {i}}{f\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{m+4}\,\left (m^4\,16{}\mathrm {i}+m^3\,128{}\mathrm {i}+m^2\,344{}\mathrm {i}+m\,352{}\mathrm {i}+105{}\mathrm {i}\right )}+\frac {\cos \left (3\,e+3\,f\,x\right )\,\left (m+2\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,\left (-A\,3{}\mathrm {i}+B\,4{}\mathrm {i}+B\,m\,2{}\mathrm {i}\right )}{f\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{m+4}\,\left (m^4\,16{}\mathrm {i}+m^3\,128{}\mathrm {i}+m^2\,344{}\mathrm {i}+m\,352{}\mathrm {i}+105{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________